#ifndef SLOG2_CONTEXT_DATA_H_
#define SLOG2_CONTEXT_DATA_H_

#include "common.h"
#include "slog2_context.h"
#include <vector>

class Slog2ContextData final
{
  public:

    Slog2ReturnValue Initialize(Slog2Context *context);
    Slog2ReturnValue WriteStart(Slog2SeverityLevel severity);
    Slog2ReturnValue WriteStart();
    Slog2ReturnValue WriteFinish();

    Slog2ReturnValue Write(uint8_t value);
    Slog2ReturnValue Write(uint16_t value);
    Slog2ReturnValue Write(uint32_t value);
    Slog2ReturnValue Write(uint64_t value);
    Slog2ReturnValue Write(int8_t value);
    Slog2ReturnValue Write(int16_t value);
    Slog2ReturnValue Write(int32_t value);
    Slog2ReturnValue Write(int64_t value);
    Slog2ReturnValue Write(float value);
    Slog2ReturnValue Write(double value);
    Slog2ReturnValue Write(bool value);
    Slog2ReturnValue Write(const char *value);
    Slog2ReturnValue Write(const std::string value);
    Slog2ReturnValue Write(std::vector<uint8_t> value);

    Slog2ReturnValue Read(std::string &value);

  private:
    Slog2ReturnValue concat(std::string &&data);
    Slog2Context *context_;
    Slog2SeverityLevel severity_;
    std::string data_;
};

#endif //SLOG2_CONTEXT_DATA_H_
